#!/usr/bin/env python
# @FileName :小测试1.py
# @Time :2024/1/14 11:45
# @Author :zhenglu

# 从键盘输入一串字符，统计a出现的次数
str1 = input("请输入一串字符串")
count = 0
for i in str1:
    if i == 'a':
        count += 1
print("字符串中a的出现次数为", count)